<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function startTime(time){
            let p=new Promise(function(resolve,reject){
                setTimeout(resolve,time);
            });
            return p;
        }
       /*  startTime(2000).then(function(){
            console.log(11);
            return startTime(2000);
        }).then(function(){
            console.log(22);
            return startTime(2000);
        }).then(function(){
            console.log(33);
        });
 */     
        var p=startTime(2000);
        var p3=p.then(function(){
            console.log(11);
            var p2=startTime(2000);
            return p2;
        });
        var p5=p3.then(function(){
            console.log(22);
            var p4=startTime(2000);
            return p4;
        });
       p5.then(function(){
           console.log(33);
       });
    </script>
</head>
<body>
    
</body>
</html>